package com.yourname.lab4.v2;

public abstract class AbstractExpression {
    protected int left;
    protected int right;

    public AbstractExpression(int left, int right) {
        this.left = left;
        this.right = right;
    }

    public abstract int calculate();

    public abstract String toString();

    // Getter 方法
    public int getLeft() { return left; }
    public int getRight() { return right; }
}